
<div class="think-box-shadow">
    <form action="{:sysuri()}" method="post" data-auto="true" class="layui-form layui-card" data-table-id="UserTable">
        <div class="layui-card-body padding-left-40">
            <div class="layui-row layui-col-space5">
                <div class="layui-col-xs2">
                    <div class="layui-form-item margin-bottom-5">
                        <div class="help-label"><b>营业执照</b></div>
                        <div class="layui-textarea help-images">
                            <input type="hidden" value="{$vo.business_license|default=''}" name="business_license">
                        </div>
                        <script>$('[name=business_license]').uploadOneImage();</script>
                    </div>
                </div>

                <div class="layui-col-xs12">
                    <div class="layui-form-item">
                        <label class="relative block">
                            <span class="color-green font-w7"><b>企业名称</b></span>
                            <span class="color-desc margin-left-5"></span>
                            <input type="text" name="name" required value='{$vo.name|default=""}' placeholder="请输入企业名称"
                                   class="layui-input">
                        </label>
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <div class="layui-form-item">
                        <label class="relative block">
                            <span class="color-green font-w7"><b>企业性质</b></span>
                            <span class="color-desc margin-left-5"></span>
                            <input type="text" name="property" required value='{$vo.property|default=""}' placeholder="请输入企业性质"
                                   class="layui-input">
                        </label>
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <div class="layui-form-item">
                        <label class="relative block">
                            <span class="color-green font-w7"><b>所属行业</b></span>
                            <span class="color-desc margin-left-5"></span>
                            <input type="text" name="industry" required value='{$vo.industry|default=""}' placeholder="请输入所属行业"
                                   class="layui-input">
                        </label>
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <div class="layui-form-item">
                        <label class="relative block">
                            <span class="color-green font-w7"><b>联系人</b></span>
                            <span class="color-desc margin-left-5"></span>
                            <input type="text" name="contact_user" required value='{$vo.contact_user|default=""}' placeholder="请输入联系人"
                                   class="layui-input">
                        </label>
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <div class="layui-form-item">
                        <label class="relative block">
                            <span class="color-green font-w7"><b>联系电话</b></span>
                            <span class="color-desc margin-left-5"></span>
                            <input type="text" name="contact_mobile" required value='{$vo.contact_mobile|default=""}' placeholder="请输入联系电话"
                                   class="layui-input">
                        </label>
                    </div>
                </div>

                <div class="layui-col-xs12">
                    <div class="layui-form-item">
                        <label class="relative block">
                            <span class="color-green font-w7"><b>地址</b></span>
                            <span class="color-desc margin-left-5"></span>
                            <input type="text" name="address" required value='{$vo.address|default=""}' placeholder="请输入地址"
                                   class="layui-input">
                        </label>
                    </div>
                </div>
                <div class="layui-col-xs12">
                    <div class="layui-form-item layui-form-text">
                        <div class="help-label"><b>简介</b></div>
                        <label class="relative block">
                            <textarea required name="content" class="layui-textarea">{$vo.content|default=''}</textarea>
                        </label>
                        <div class="help-block">内容，建议控制2000字以内</div>
                    </div>
                </div>
                <div class="layui-col-xs12">
                    <div class="layui-form-item margin-bottom-5">
                        <div class="help-label"><b>公司图片</b></div>
                        <div class="layui-textarea help-images">
                            <input type="hidden" value="{$vo.pics|default=''}" name="pics">
                        </div>
                        <script>$('[name=pics]').uploadMultipleImage();</script>
                    </div>
                </div>
                <div class="layui-col-xs12">
                    <div class="layui-form-item">
                        <div class="relative block">
                            <span class="color-green font-w7"><b>状态</b></span>
                            <div class="layui-input">
                                {foreach [['title'=>'审核中','value'=>0,'is_default'=>1],['title'=>'已通过','value'=>1,'is_default'=>0],['title'=>'已拒绝','value'=>2,'is_default'=>0]] as $v }
                                {if isset($vo.status) && $vo.status==$v['value'] || $v['is_default']==1 }
                                <input type="radio" name="status" checked title="{$v.title}" value="{$v.value}">
                                {else /}<input type="radio" name="status" title="{$v.title}" value="{$v.value}">
                                {/if}
                                {/foreach}
                            </div>

                        </div>
                    </div>
                </div>
                <div class="layui-col-xs12">
                    <div class="layui-form-item layui-form-text">
                        <div class="help-label"><b>审核信息</b></div>
                        <label class="relative block">
                            <textarea name="reason" class="layui-textarea">{$vo.reason|default=''}</textarea>
                        </label>
                        <div class="help-block"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="hr-line-dashed"></div>
        {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
        <input type="hidden" name="spm" value="{$get.spm|default=''}">
        <div class="layui-form-item text-center">
            <button class="layui-btn" type='submit' lay-submit lay-filter="save-data">保存数据</button>
            <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>
                取消编辑
            </button>
        </div>
    </form>
</div>

<script>
    //注意：导航 依赖 element 模块，否则无法进行功能性操作
    layui.use(['element', 'form'], function () {
        var element = layui.element;
        var form = layui.form;
        form.render();
        form.on('submit(save-data)', function (data) {
            // const field=data.field;
            // if (typeof field.type === 'undefined') {
            //     layer.alert('请选择是否中奖');
            //     return  false;
            // }
            return true;
        });
    });
</script>